package it.gmariotti.cardslib.library.prototypes;

import it.gmariotti.cardslib.library.CardWithList;
import it.gmariotti.cardslib.library.internal.Card;

public interface ListObject {

    /**
     * Returns the object id
     *
     * @return String
     */
    String getObjectId();

    /**
     * Returns the parent card
     *
     * @return Card
     */
    Card getParentCard();

    /**
     * Register a callback to be invoked when an item in this LinearListView has
     * been clicked.
     *
     * @param onItemClickListener
     * @return The callback to be invoked with an item in this LinearListView has
     * been clicked, or null id no callback has been set.
     */
    void setOnItemClickListener(CardWithList.OnItemClickListener onItemClickListener);

    /**
     * getOnItemClickListener
     *
     * @return The callback to be invoked with an item in this LinearListView has
     * been clicked, or null id no callback has been set.
     */
    CardWithList.OnItemClickListener getOnItemClickListener();

    /**
     * Indicates if the item is swipeable
     * @return boolean
     */
    boolean isSwipeable();

    /**
     * Set the item as swipeable
     *
     * @param isSwipeable
     */
    void setSwipeable(boolean isSwipeable);

    /**
     * Returns the callback to be invoked when item has been swiped
     *
     * @return listener
     */
    CardWithList.OnItemSwipeListener getOnItemSwipeListener();

    /**
     * Register a callback to be invoked when an item in this LinearListView has
     * been swiped.
     *
     * @param onSwipeListener listener
     */
    void setOnItemSwipeListener(CardWithList.OnItemSwipeListener onSwipeListener);

}